package com.member.common.enums;


import lombok.Getter;

import java.util.Objects;

@Getter
public enum OperationItemEnum {

    MEMBER_RECHARGE( 1, "会员充值"),
    ADD_MEMBERS(2, "添加会员"),
    ;


    private final Integer key;
    private final String desc;

    OperationItemEnum(Integer key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static OperationItemEnum getByKey(Integer _key){
        for (OperationItemEnum item : OperationItemEnum.values()){
            if(Objects.equals(item.getKey(), _key)){
                return item;
            }
        }
        return null;
    }

}
